package com.wzdigit.wms.basic.mapper.core.transfer;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.domain.transfer.CtnrLoading;
import com.wzdigit.wms.basic.client.response.transfer.CtnrLoadingResponse;
import com.wzdigit.wms.basic.client.response.transfer.GdnCtnrDtlGoodsResponse;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 装柜单 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2021-02-23
 */
@MyBatisRepository
public interface CtnrLoadingMapper extends BaseMapper<CtnrLoading> {
	
	List<CtnrLoadingResponse> selectByGdnHeaderId(Integer gdnHeaderId);
	
	List<String> selectCtnrNoListByDtlId(Long dtlId);

	GdnCtnrDtlGoodsResponse selectGdnDtlByNo(@Param("dtlId") Long dtlId, @Param("ctnrNo") String ctnrNo);

    void updateStatusAndQtyByNo(@Param("status") Integer status, @Param("thisQty") BigDecimal thisQty, @Param("ctnrNo") String ctnrNo,
								@Param("dtlId") Long dtlId);

	List<CtnrLoading> selectCtnrListByDtlId(@Param("gdnDtlId") Integer gdnDtlId);

	int updateStatusQtyModifyByNo(@Param("status") Integer status, @Param("thisQty") BigDecimal thisQty, @Param("ctnrNo") String ctnrNo, @Param("dtlId") Long dtlId, @Param("loginName") String loginName, @Param("date") Date date);
}
